//
//  CLImageCollectionCell.h
//  CLImagePicker
//
//  Created by Criss on 2017/3/22.
//  Copyright © 2017年 Criss. All rights reserved.
//

#import <UIKit/UIKit.h>

static inline UIImage *obtainImage(NSString *imageName) {
    NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"CLImagePickerResource" ofType:@"bundle"];
    NSBundle *imageBundle = [NSBundle bundleWithPath:bundlePath];
    
    NSString *imagePath = [[imageBundle resourcePath] stringByAppendingPathComponent:imageName];
    return [UIImage imageWithContentsOfFile:imagePath];
}

@interface CLImageCollectionCell : UICollectionViewCell

@property (nonatomic, strong) UIImage *image;
@property (nonatomic, assign, getter=isImageSelected) BOOL imageSelected;

@property (copy, nonatomic) void(^imageSelectedBlock)(UIImage *image, CLImageCollectionCell *imageCell);

- (UIImageView *)obtainImageView;

@end
